package com.library.common.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * 阿里云发送短信参数配置
 *
 * @author: xyh
 * @create: 2023-09-24
 **/
@Configuration
@Data
public class SmsConfig {

    /**
     * KEY
     */
    public static String accessKeyId;

    /**
     * 密钥
     */
    public static String accessKeySecret;

    /**
     * 区域ID
     */
    public static String regionId;

    /**
     * 短信签名
     */
    public static String signName;

    /**
     * 短信模板ID
     */
    public static String templateCode;


    @Value("${sms.accessKeyId}")
    public void setAccessKeyId(String keyId) {
        accessKeyId = keyId;
    }

    @Value("${sms.accessKeySecret}")
    public void setAccessKeySecret(String secret) {
        accessKeySecret = secret;
    }

    @Value("${sms.regionId}")
    public void setRegionId(String region) {
        regionId = region;
    }

    @Value("${sms.signName}")
    public void setSignName(String sign) {
        signName = sign;
    }

    @Value("${sms.templateCode}")
    public void setTemplateCode(String code) {
        templateCode = code;
    }

}
